package com.ysyx.ysyx_admin.controller;

import com.ysyx.ysyx_admin.pojo.PassengerPojo;
import com.ysyx.ysyx_admin.service.PassengePojoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @description: xxxx接口/类
 * @author:Lenovo
 * @create:2023/4/18 10:07
 */

@RestController
@RequestMapping("/passenger")
public class PassengerController {

    @Autowired
    private PassengePojoService passengerPojoService;


    @RequestMapping("/showGoods")
    public List<PassengerPojo> showGoods(@RequestBody PassengerPojo passengerPojo) {
        List<PassengerPojo> passengerPojos = passengerPojoService.showGoods(passengerPojo);
        return passengerPojos;
    }



    @RequestMapping(value = "/passengerCount", method = RequestMethod.GET)
    public int passengerCount() {
        int num = passengerPojoService.passengerCount();
        return num;
    }
}
